Optimal. Leaf size=242 \[ \frac {(A-5 B+9 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(2 B-3 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{a^{3/2} d}+\frac {(A-B+3 C) \sin (c+d x)}{2 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a \sec (c+d x)+a}}-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {5}{2}}(c+d x) (a \sec (c+d x)+a)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.75, antiderivative size = 242, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {4265, 4084, 4021, 4023, 3808, 206, 3801, 215} \[ \frac {(A-5 B+9 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(2 B-3 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{a^{3/2} d}+\frac {(A-B+3 C) \sin (c+d x)}{2 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a \sec (c+d x)+a}}-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {5}{2}}(c+d x) (a \sec (c+d x)+a)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 215
Rule 3801
Rule 3808
Rule 4021
Rule 4023
Rule 4084
Rule 4265
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}} \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sec ^{\frac {3}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sec ^{\frac {3}{2}}(c+d x) \left (\frac {1}{2} a (A+3 B-3 C)+a (A-B+3 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{2 a^2}\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+3 C) \sin (c+d x)}{2 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)} \left (\frac {1}{2} a^2 (A-B+3 C)+a^2 (2 B-3 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{2 a^3}\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+3 C) \sin (c+d x)}{2 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}+\frac {\left ((2 B-3 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx}{2 a^2}+\frac {\left ((A-5 B+9 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a}\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+3 C) \sin (c+d x)}{2 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {\left ((2 B-3 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^2 d}-\frac {\left ((A-5 B+9 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{2 a d}\\ &=\frac {(2 B-3 C) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{a^{3/2} d}+\frac {(A-5 B+9 C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+3 C) \sin (c+d x)}{2 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.51, size = 198, normalized size = 0.82 \[ \frac {\cos ^3\left (\frac {1}{2} (c+d x)\right ) \sqrt {\cos (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (2 (A-5 B+9 C) \tanh ^{-1}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-\frac {2 \left (\sin \left (\frac {1}{2} (c+d x)\right ) (A-B+2 C \sec (c+d x)+3 C)+2 \sqrt {2} (2 B-3 C) \cos ^2\left (\frac {1}{2} (c+d x)\right ) \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right )\right )}{\sin ^2\left (\frac {1}{2} (c+d x)\right )-1}\right )}{d (a (\sec (c+d x)+1))^{3/2} (A \cos (2 (c+d x))+A+2 B \cos (c+d x)+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.81, size = 728, normalized size = 3.01 \[ \left [\frac {\sqrt {2} {\left ({\left (A - 5 \, B + 9 \, C\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (A - 5 \, B + 9 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (A - 5 \, B + 9 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {2} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left ({\left (A - B + 3 \, C\right )} \cos \left (d x + c\right ) + 2 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 \, {\left ({\left (2 \, B - 3 \, C\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (2 \, B - 3 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (2 \, B - 3 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} + 4 \, \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} {\left (\cos \left (d x + c\right ) - 2\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right )^{2} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right )}{8 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}}, -\frac {\sqrt {2} {\left ({\left (A - 5 \, B + 9 \, C\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (A - 5 \, B + 9 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (A - 5 \, B + 9 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )}}{a \sin \left (d x + c\right )}\right ) - 2 \, {\left ({\left (A - B + 3 \, C\right )} \cos \left (d x + c\right ) + 2 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 \, {\left ({\left (2 \, B - 3 \, C\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (2 \, B - 3 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (2 \, B - 3 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{4 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (a \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}} \cos \left (d x + c\right )^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.43, size = 553, normalized size = 2.29 \[ \frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (2 B \cos \left (d x +c \right ) \sin \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+1-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}-2 B \cos \left (d x +c \right ) \sin \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+1+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}-3 C \sin \left (d x +c \right ) \sqrt {2}\, \cos \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+1-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right )+3 C \sin \left (d x +c \right ) \sqrt {2}\, \cos \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+1+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right )+A \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right )-A \cos \left (d x +c \right ) \sin \left (d x +c \right ) \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right )-B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right )+5 B \cos \left (d x +c \right ) \sin \left (d x +c \right ) \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right )+3 C \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}-9 C \sin \left (d x +c \right ) \cos \left (d x +c \right ) \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right )-A \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \cos \left (d x +c \right )+B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \cos \left (d x +c \right )-C \cos \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}-2 C \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\right )}{2 d \,a^{2} \sin \left (d x +c \right )^{3} \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sqrt {\cos \left (d x +c \right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^{3/2}\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________